Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit: Fix Regexp for stripping .git from repo URLs #7644

Merged
merged 2 commits into from
May 25, 2020

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented May 25, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

  • For a formula named turbogit, we didn't see any of the notability checks fail CI.
  • The repo name was getting truncated to turb, which didn't exist, so the audit didn't return anything for this check.
  • The Regexp to strip .git from the end of a repo URL was not escaping the ., so it would match anything ending in git, not a literal .git.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One style suggestion (which brew style may barf on): otherwise 💚

Library/Homebrew/dev-cmd/audit.rb Outdated Show resolved Hide resolved
- [For a formula named
  turbogit](Homebrew/homebrew-core#55208), we
  didn't see any of the notability checks fail CI.
- The repo name was getting truncated to `turb`, which didn't exist, so
  the audit didn't return anything for this check.
- The Regexp to strip `.git` from the end of was not escaping the `.`,
  so it would match anything ending in `git`, not a literal `.git`.
@issyl0 issyl0 force-pushed the audit-fix-regex-parsing-for-git branch from d8cba67 to 0cced8e Compare May 25, 2020 11:48
```
➜ brew audit --online --new-formula --verbose turbogit
turbogit:
  * GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)
  * GitHub repository too new (<30 days old)
Error: undefined local variable or method `created_pr_comment' for Homebrew:Module
/usr/local/Homebrew/Library/Homebrew/dev-cmd/audit.rb:148:in `audit'
/usr/local/Homebrew/Library/Homebrew/brew.rb:110:in `<main>'
```

- This was removed in 4f75a77. We can't
  post PR comments from GitHub Actions CI from forks.
@issyl0 issyl0 force-pushed the audit-fix-regex-parsing-for-git branch from e990786 to d14eed6 Compare May 25, 2020 12:00
@issyl0
Copy link
Member Author

issyl0 commented May 25, 2020

Thanks, I'll merge this when it's (finally) green. 🙄

@issyl0 issyl0 merged commit a56c305 into Homebrew:master May 25, 2020
@issyl0 issyl0 deleted the audit-fix-regex-parsing-for-git branch May 25, 2020 12:23
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 29, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants